'''
Created on 2011-7-3

@author: JHL
'''
from cdsay.picture.models import PhotoModel
from django import newforms as forms

class pictureForm(forms.Form):
    title = forms.CharField(max_length=60)
    image = forms.ImageField()

    def save(self):
        PhotoModel.title=self.title
        PhotoModel.image=self.image
        PhotoModel.save(self)
        return self.title